m=int(input())
n=int(input())
b=0
c=0
#for i in range(m,n):    
#     if i%2==0:
#          b=b+1
#for i in range(m,n):    
#     if i%2==1:
#          c=c+1
for i in range(m,n):
    if i%2==1:
          c=c+1
    else:
          b=b+1


    
print(c)
print(b)